home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Menu / c / MakeWrite < prev    next >
Text File  |  1995-07-09  |  1KB  |  36 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Menu.MakeWrite.c
  12.     Author:  Copyright © 1993 Shaun Blackmore and Jason Williams
  13.     Version: 1.00 (30 Apr 1993)
  14.     Purpose: Makes a menu item writable
  15. */
  16.  
  17.  
  18. #include "DeskLib:Core.h"
  19. #include "DeskLib:Wimp.h"
  20. #include "DeskLib:Menu.h"
  21.  
  22.  
  23. void Menu_MakeWritable(menu_ptr menu, int entry,
  24.                        char *buffer, int size, char *valid)
  25. {
  26.   menu_item *item = (menu_item *) (((int) menu) + sizeof(menu_block));
  27.  
  28.   item = &item[entry];
  29.   item->menuflags.data.writable   = TRUE;
  30.   item->iconflags.data.indirected = TRUE;
  31.  
  32.   item->icondata.indirecttext.buffer      = buffer;
  33.   item->icondata.indirecttext.bufflen     = size;
  34.   item->icondata.indirecttext.validstring = valid;
  35. }
  36.